/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package service.reportCenter.multiReport;

import service.enumerations.LabResult;

/**
 *
 * @author chapmand
 */
public enum ReportType {
    BREW_FORECAST(0),
    CLEANING_REP(1);

    private int type;

    ReportType(final int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static ReportType getType(final String type) {
        return getType(Integer.parseInt(type));
    }

    public static ReportType getType(final int type) {
        switch (type) {
            case 0:
                return BREW_FORECAST;
            case 1:
                return CLEANING_REP;
            default:
                throw new EnumConstantNotPresentException(LabResult.class, String.valueOf(type));
        }
    }
}
